package com.datacow.modules.climbingdata.controller;
/**
 * @Description:
 * @Author: 李德森
 * @Date: 2021/1/13
 */

import com.datacow.common.utils.R;
import com.datacow.modules.climbingdata.service.ProductHuntProcessorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@EnableScheduling
@RestController
public class ProductHuntController {

    @Autowired
    private ProductHuntProcessorService productHuntProcessorService;


    //@Scheduled(cron = "${scheduled.time}")
    @GetMapping("/startcliming")
    public R getProductHuntInfo() {
        productHuntProcessorService.start(productHuntProcessorService);
        return R.ok("开始爬取数据");
    }

}
